<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  data () {
    return {

    }
  },
  async created () {
    let res = await this.$api.post('/wx/getwxconfig', {
      debug: false,
      jsApiList: [
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'chooseImage',
        'uploadImage',
        'updateAppMessageShareData',
        'updateTimelineShareData',
        'onMenuShareQZone',
        'onMenuShareWeibo',
        'onMenuShareQQ'
      ],
      url: window.location.href.split('#')[0]
    })
    if (res.data.state) {
      wx.config(res.data.data)
    }
  },
  async mounted () {

  }
}
</script>

<style>
  *{
    margin:0;
    padding:0;
  }
.hasone:after{
  background: #ccc;
}


  html{
    height: 100%;
  }
  body{
    height: 100%;
  }
  #app{
    height: 100%;
  }
  #app>div{
    height: 100%;
  }

  .hd{
    height: 45px;
    line-height: 45px;
    text-align: center;
    background-color: #f3f3f3;
    font-size: 14px;
    position:relative;
  }
  .hd span{
    border:1px solid #ccc;
    position: absolute;
    left:15px;
    font-size: 12px;
    height: 25px;
    line-height: 25px;
    padding:0 15px;
    border-radius: 3px;
    background-color: #d9d9d9;
    top:8px;

  }
  .clearfix:after{
    content:'';
    display:block;
    clear:both
  }
  .fl{
    float:left
  }
  .fr{
    float:right
  }
  .ub{
    background-size: cover;
  }
  .ua{
    background-size: cover;
  }
  .icon-yue{
    color:orangered;
  }
  .icon-weixin{
    color:green;
  }

</style>
